home *** CD-ROM | disk | FTP | other *** search
- Frequently Asked Questions (FAQS);faqs.535
-
-
-
- 2.1) How do I remove a file whose name begins with a "-" ?
- 2.2) How do I remove a file with funny characters in the filename ?
- 2.3) How do I get a recursive directory listing?
- 2.4) How do I get the current directory into my prompt?
- 2.5) How do I read characters from the terminal in a shell script?
- 2.6) How do I rename "*.foo" to "*.bar", or change file names
- to lowercase?
- 2.7) Why do I get [some strange error message] when I
- "rsh host command" ?
- 2.8) How do I {set an environment variable, change directory} inside a
- program or shell script and have that change affect my
- current shell?
- 2.9) How do I redirect stdout and stderr separately in csh?
- 2.10) How do I tell inside .cshrc if I'm a login shell?
- 2.11) How do I construct a shell glob-pattern that matches all files
- except "." and ".." ?
- 2.12) How do I find the last argument in a Bourne shell script?
- 2.13) What's wrong with having '.' in your $PATH ?
-
- 3.1) How do I find out the creation time of a file?
- 3.2) How do I use "rsh" without having the rsh hang around
- until the remote command has completed?
- 3.3) How do I truncate a file?
- 3.4) Why doesn't find's "{}" symbol do what I want?
- 3.5) How do I set the permissions on a symbolic link?
- 3.6) How do I "undelete" a file?
- 3.7) How can a process detect if it's running in the background?
- 3.8) Why doesn't redirecting a loop work as intended? (Bourne shell)
- 3.9) How do I run 'passwd', 'ftp', 'telnet', 'tip' and other interactive
- programs from a shell script or in the background?
- 3.10) How do I find out the process ID of a program with a particular
- name from inside a shell script or C program?
- 3.11) How do I check the exit status of a remote command
- executed via "rsh" ?
- 3.12) Is it possible to pass shell variable settings into an awk program?
- 3.13) How do I get rid of zombie processes that persevere?
- 3.14) How do I get lines from a pipe as they are written instead of
- only in larger blocks.
-
- 4.1) How do I read characters from a terminal without requiring the user
- to hit RETURN?
- 4.2) How do I check to see if there are characters to be read without
- actually reading?
- 4.3) How do I find the name of an open file?
- 4.4) How can an executing program determine its own pathname?
- 4.5) How do I use popen() to open a process for reading AND writing?
- 4.6) How do I sleep() in a C program for less than one second?
- 4.7) How can I get setuid shell scripts to work?
- 4.8) How can I find out which user or process has a file open or is using
- a particular file system (so that I can unmount it?)
- 4.9) How do I keep track of people who are fingering me?
- 4.10) Is it possible to reconnect a process to a terminal after it has
- been disconnected, e.g. after starting a program in the background
- and logging out?
- 4.11) Is it possible to "spy" on a terminal, displaying the output
- that's appearing on it on another terminal?
-
- 5.1) Can shells be classified into categories?
- 5.2) How do I "include" one shell script from within another
- shell script?
- 5.3) Do all shells have aliases? Is there something else that
- can be used?
- 5.4) How are shell variables assigned?
- 5.5) How can I tell if I am running an interactive shell?
- 5.6) What "dot" files do the various shells use?
- 5.7) I would like to know more about the differences between the
- various shells. Is this information available some place?
-
- 6.1) Disclaimer and introduction.
- 6.2) A very brief look at Unix history.
- 6.3) Main Unix flavors.
- 6.4) Unix Standards.
- 6.5) Identifying your Unix flavor.
- 6.6) Brief notes on some well-known (commercial/PD) Unices.
- 6.7) Real-time Unices.
- 6.8) Unix glossary.
- 6.9) Acknowledgements.
-
- 7.1) RCS vs SCCS: Introduction
- 7.2) RCS vs SCCS: How do the interfaces compare?
- 7.3) RCS vs SCCS: What's in a Revision File?
- 7.4) RCS vs SCCS: What are the keywords?
- 7.5) What's an RCS symbolic name?
- 7.6) RCS vs SCCS: How do they compare for performance?
- 7.7) RCS vs SCCS: Version Identification.
- 7.8) RCS vs SCCS: How do they handle with problems?
- 7.9) RCS vs SCCS: Conversion.
- 7.10) RCS vs SCCS: Support
- 7.11) RCS vs SCCS: Command Comparison
- 7.12) RCS vs SCCS: Acknowledgements
- 7.13) Can I get more information on configuration management systems?
-
- If you're looking for the answer to, say, question 2.5, look in
- part 2 and search for the regular expression "^2.5)".
-
- While these are all legitimate questions, they seem to crop up in
- comp.unix.questions or comp.unix.shell on an annual basis, usually
- followed by plenty of replies (only some of which are correct) and then
- a period of griping about how the same questions keep coming up. You
- may also like to read the monthly article "Answers to Frequently Asked
- Questions" in the newsgroup "news.announce.newusers", which will tell
- you what "UNIX" stands for.
-
- With the variety of Unix systems in the world, it's hard to guarantee
- that these answers will work everywhere. Read your local manual pages
- before trying anything suggested here. If you have suggestions or
- corrections for any of these answers, please send them to to
- tmatimar@empress.com.
-
- --
- Ted Timar - tmatimar@empress.com
- Empress Software, 3100 Steeles Ave E, Markham, Ont., Canada L3R 8T3
- Xref: bloom-picayune.mit.edu comp.unix.questions:51331 comp.unix.shell:8337 news.answers:4773
- Path: bloom-picayune.mit.edu!senator-bedfellow.mit.edu!senator-bedfellow.mit.edu!usenet
- From: tmatimar@empress.com (Ted M A Timar)
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Subject: Changes to "Unix - Frequently Asked Questions" [Frequent posting]
- Supersedes: <unix-faq/faq/diff_723967331@athena.mit.edu>
- Followup-To: comp.unix.questions
- Date: 24 Dec 1992 06:02:46 GMT
- Organization: Empress Software
- Lines: 397
- Approved: news-answers-request@MIT.Edu
- Distribution: world
- Expires: 21 Jan 1993 06:02:09 GMT
- Message-ID: <unix-faq/faq/diff_725176929@athena.mit.edu>
- NNTP-Posting-Host: pit-manager.mit.edu
- X-Last-Updated: 1992/12/09
-
- Archive-name: unix-faq/faq/diff
-
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:32 1992
- --- contents Fri Dec 4 07:38:52 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (index) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/contents
- ! Version: $Id: contents,v 2.0 92/10/20 12:06:12 tmatimar Exp $
-
- The following seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (Contents) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/contents
- ! Version: $Id: contents,v 2.1 92/12/04 07:43:28 tmatimar Exp $
-
- The following seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- ***************
- *** 23,28 ****
- --- 23,29 ----
- they already knew all of the answers.
- 5.*) Questions pertaining to the various shells, and the differences.
- 6.*) An overview of Unix variants.
- + 7.*) An comparison of configuration management systems (RCS, SCCS).
-
- The following questions are answered:
-
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:32 1992
- --- part1 Fri Dec 4 07:38:53 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (1/7) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/part1
- ! Version: $Id: part1,v 2.0 92/10/20 12:06:59 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (1/7) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/part1
- ! Version: $Id: part1,v 2.1 92/12/04 07:43:43 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:33 1992
- --- part2 Fri Dec 4 07:38:53 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (2/7) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/part2
- ! Version: $Id: part2,v 2.0 92/10/20 12:07:03 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (2/7) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/part2
- ! Version: $Id: part2,v 2.1 92/12/04 07:43:45 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- ***************
- *** 586,596 ****
- has already been redirected so only stderr actually winds up in
- stderr_file.
-
- ! Sometimes it's easier to let sh do the work for you.
-
- ! sh -c 'command >stdout_file 2>stderr_file'
-
- 2.10) How do I tell inside .cshrc if I'm a login shell?
-
- When people ask this, they usually mean either
-
- --- 586,600 ----
- has already been redirected so only stderr actually winds up in
- stderr_file.
-
- ! If what you want is to avoid redirecting stdout at all, let sh
- ! do it for you.
-
- ! sh -c 'command 2>stderr_file'
-
- 2.10) How do I tell inside .cshrc if I'm a login shell?
- +
- + From: msb@sq.com (Mark Brader)
- + Date: Mon, 26 Oct 1992 20:15:00 -0500
-
- When people ask this, they usually mean either
-
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:36 1992
- --- part3 Fri Dec 4 07:38:54 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (3/7) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/part3
- ! Version: $Id: part3,v 2.0 92/10/20 12:07:07 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (3/7) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/part3
- ! Version: $Id: part3,v 2.1 92/12/04 07:43:49 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:39 1992
- --- part4 Fri Dec 4 07:38:54 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (4/7) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/part4
- ! Version: $Id: part4,v 2.0 92/10/20 12:07:10 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (4/7) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/part4
- ! Version: $Id: part4,v 2.1 92/12/04 07:43:53 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- ***************
- *** 438,443 ****
- --- 438,447 ----
-
- 4.9) How do I keep track of people who are fingering me?
-
- + From: jik@pit-manager.MIT.EDU (Jonathan I. Kamens)
- + From: malenovi@plains.NoDak.edu (Nikola Malenovic)
- + Date: Mon, 23 Nov 1992 16:01:45 -0600
- +
- Generally, you can't find out the userid of someone who is
- fingering you from a remote machine. You may be able to
- find out which machine the remote request is coming from.
- ***************
- *** 466,481 ****
- For more information join the rfc931-users mailing list,
- rfc931-users-request@kramden.acf.nyu.edu.
-
- ! There are two caveats relating to this answer. The first is that
- ! many NFS systems won't allow the recognize the named pipe
- ! correctly. This means that trying to read the pipe on another
- ! machine will either block until it times out, or see it as a
- ! zero-length file, and never print it.
-
- The second problem is that on many systems, fingerd checks that
- the .plan file contains data (and is readable) before trying to
- ! read it. This will not cause remote fingers to miss your .plan
- ! file entirely.
-
- 4.10) Is it possible to reconnect a process to a terminal after it has
- been disconnected, e.g. after starting a program in the background
- --- 470,493 ----
- For more information join the rfc931-users mailing list,
- rfc931-users-request@kramden.acf.nyu.edu.
-
- ! There are three caveats relating to this answer. The first is
- ! that many NFS systems won't recognize the named pipe correctly.
- ! This means that trying to read the pipe on another machine will
- ! either block until it times out, or see it as a zero-length file,
- ! and never print it.
-
- The second problem is that on many systems, fingerd checks that
- the .plan file contains data (and is readable) before trying to
- ! read it. This will cause remote fingers to miss your .plan file
- ! entirely.
- !
- ! The third problem is that a system that supports named pipes
- ! usually has a fixed number of named pipes available on the
- ! system at any given time - check the kernel config file and
- ! FIFOCNT option. If the number of pipes on the system exceeds the
- ! FIFOCNT value, the system blocks new pipes until somebody frees
- ! the resources. The reason for this is that buffers are allocated
- ! in a non-paged memory.
-
- 4.10) Is it possible to reconnect a process to a terminal after it has
- been disconnected, e.g. after starting a program in the background
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:40 1992
- --- part5 Fri Dec 4 07:38:55 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (5/7) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/part5
- ! Version: $Id: part5,v 2.0 92/10/20 12:07:13 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (5/7) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/part5
- ! Version: $Id: part5,v 2.1 92/12/04 07:43:55 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- ***************
- *** 87,93 ****
- Date: Wed, 7 Oct 92 14:28:18 -0500
-
- All of the major shells other than sh have aliases, but they
- ! don't all work the same way. For example, some don't except
- arguments.
-
- Although not strictly equivalent, shell functions (which exist in
- --- 87,93 ----
- Date: Wed, 7 Oct 92 14:28:18 -0500
-
- All of the major shells other than sh have aliases, but they
- ! don't all work the same way. For example, some don't accept
- arguments.
-
- Although not strictly equivalent, shell functions (which exist in
- ***************
- *** 113,127 ****
- 5.5) How can I tell if I am running an interactive shell?
-
- From: wicks@dcdmjw.fnal.gov (Matthew Wicks)
- ! Date: Wed, 7 Oct 92 14:28:18 -0500
-
- ! In the Bourne shell category look for the variable $PROMPT. In
- ! the C shell category, look for the variable $prompt.
-
- 5.6) What "dot" files do the various shells use?
-
- From: wicks@dcdmjw.fnal.gov (Matthew Wicks)
- ! Date: Wed, 7 Oct 92 14:28:18 -0500
-
- Although this may not be a complete listing, this provides the
- majority of information.
- --- 113,139 ----
- 5.5) How can I tell if I am running an interactive shell?
-
- From: wicks@dcdmjw.fnal.gov (Matthew Wicks)
- ! From: dws@ssec.wisc.edu (DaviD W. Sanderson)
- ! Date: Fri, 23 Oct 92 11:59:19 -0600
-
- ! In the C shell category, look for the variable $prompt.
-
- + In the Bourne shell category, you can look for the variable $PS1,
- + however, it is better to check the variable $-. If $- contains
- + an 'i', the shell is interactive. Test like so:
- +
- + case $- in
- + *i*) # do things for interactive shell
- + ;;
- + *) # do things for non-interactive shell
- + ;;
- + esac
- +
- 5.6) What "dot" files do the various shells use?
-
- From: wicks@dcdmjw.fnal.gov (Matthew Wicks)
- ! From: tmb@idiap.ch (Thomas M. Breuel)
- ! Date: Wed, 28 Oct 92 03:30:36 +0100
-
- Although this may not be a complete listing, this provides the
- majority of information.
- ***************
- *** 178,184 ****
- Start-up (in this order):
- /etc/profile - login shells.
- .bash_profile - login shells.
- ! .bashrc - interactive shells.
-
- Others:
- .inputrc - Readline initialization.
- --- 190,201 ----
- Start-up (in this order):
- /etc/profile - login shells.
- .bash_profile - login shells.
- ! .profile - login if no .bash_profile is present.
- ! .bashrc - interactive non-login shells.
- ! $ENV - always, if it is set.
- !
- ! Upon termination:
- ! .bash_logout - login shells.
-
- Others:
- .inputrc - Readline initialization.
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:43 1992
- --- part6 Fri Dec 4 07:38:55 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (6/7) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/part6
- ! Version: $Id: part6,v 2.0 92/10/20 12:07:30 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (6/7) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/part6
- ! Version: $Id: part6,v 2.1 92/12/04 07:43:57 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- *** /tmp/,RCSt1a18351 Fri Dec 4 07:46:45 1992
- --- part7 Fri Dec 4 07:38:56 1992
- ***************
- *** 2,12 ****
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Frequently Asked Questions about Unix (7/7) [Biweekly posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/part7
- ! Version: $Id: part7,v 2.0 92/10/20 12:07:46 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- --- 2,12 ----
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Followup-To: comp.unix.questions
- Organization: Empress Software
- ! Subject: Unix - Frequently Asked Questions (7/7) [Frequent posting]
- Approved: news-answers-request@MIT.Edu
-
- ! Archive-name: unix-faq/faq/part7
- ! Version: $Id: part7,v 2.1 92/12/04 07:44:00 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- Xref: bloom-picayune.mit.edu comp.unix.questions:51334 comp.unix.shell:8340 news.answers:4776
- Path: bloom-picayune.mit.edu!senator-bedfellow.mit.edu!senator-bedfellow.mit.edu!usenet
- From: tmatimar@empress.com (Ted M A Timar)
- Newsgroups: comp.unix.questions,comp.unix.shell,news.answers
- Subject: Unix - Frequently Asked Questions (1/7) [Frequent posting]
- Supersedes: <unix-faq/faq/part1_723967331@athena.mit.edu>
- Followup-To: comp.unix.questions
- Date: 24 Dec 1992 06:03:11 GMT
- Organization: Empress Software
- Lines: 324
- Approved: news-answers-request@MIT.Edu
- Distribution: world
- Expires: 21 Jan 1993 06:02:09 GMT
- Message-ID: <unix-faq/faq/part1_725176929@athena.mit.edu>
- References: <unix-faq/faq/contents_725176929@athena.mit.edu>
- NNTP-Posting-Host: pit-manager.mit.edu
- X-Last-Updated: 1992/12/09
-
- Archive-name: unix-faq/faq/part1
- Version: $Id: part1,v 2.1 92/12/04 07:43:43 tmatimar Exp $
-
- These seven articles contain the answers to some Frequently Asked
- Questions often seen in comp.unix.questions and comp.unix.shell.
- Please don't ask these questions again, they've been answered plenty
- of times already - and please don't flame someone just because they may
- not have read this particular posting. Thank you.
-
- These articles are divided approximately as follows:
-
- 1.*) General questions.
- 2.*) Relatively basic questions, likely to be asked by beginners.
- 3.*) Intermediate questions.
- 4.*) Advanced questions, likely to be asked by people who thought
- they already knew all of the answers.
- 5.*) Questions pertaining to the various shells, and the differences.
- 6.*) An overview of Unix variants.
- 7.*) An comparison of configuration management systems (RCS, SCCS).
-
- This article includes answers to:
-
- 1.1) Who helped you put this list together?
- 1.2) When someone refers to 'rn(1)' or 'ctime(3)', what does
- the number in parentheses mean?
- 1.3) What does {some strange unix command name} stand for?
- 1.4) How does the gateway between "comp.unix.questions" and the
- "info-unix" mailing list work?
- 1.5) What are some useful Unix or C books?
- 1.6) What happened to the pronunciation list that used to be
- part of this document?
-
- If you're looking for the answer to, say, question 1.5, and want to skip
- everything else, you can search ahead for the regular expression "^1.5)".
-
- While these are all legitimate questions, they seem to crop up in
- comp.unix.questions or comp.unix.shell on an annual basis, usually
- followed by plenty of replies (only some of which are correct) and then
- a period of griping about how the same questions keep coming up. You
- may also like to read the monthly article "Answers to Frequently Asked
- Questions" in the newsgroup "news.announce.newusers", which will tell
- you what "UNIX" stands for.
-
- With the variety of Unix systems in the world, it's hard to guarantee
- that these answers will work everywhere. Read your local manual pages
- before trying anything suggested here. If you have suggestions or
- corrections for any of these answers, please send them to to
- tmatimar@empress.com.
-
- 1.1) Who helped you put this list together?
-
- I took over the maintenance of this list. Almost all of the work
- (and the credit) for generating this compilation was done by
- Steve Hayman.
-
- We also owe a great deal of thanks to dozens of Usenet readers who
- submitted questions, answers, corrections and suggestions for this
- list. Special thanks go to Maarten Litmaath, Guy Harris and
- Jonathan Kamens, who have all made many especially valuable
- contributions.
-
- Part 5 of this document (shells) was written almost entirely by
- Matthew Wicks <wicks@dcdmjw.fnal.gov>.
-
- Part 6 of this document (Unix flavours) was written almost entirely by
- Pierre (P.) Lewis <lew@bnr.ca>.
-
- Where possible the author of each question and the date it was last
- updated is given at the top. Unfortunately, I only started this
- practice recently, and much of the information is lost. I was also
- negligent in keeping track of who provided updates to questions.
- Sorry to those who have made valuable contributions, but did not
- receive the credit and recognition that they legitimately deserve.
-
- 1.2) When someone refers to 'rn(1)' or 'ctime(3)', what does
- the number in parentheses mean?
-
- It looks like some sort of function call, but it isn't. These
- numbers refer to the section of the "Unix manual" where the
- appropriate documentation can be found. You could type "man 3
- ctime" to look up the manual page for "ctime" in section 3 of
- the manual.
-
- The traditional manual sections are:
-
- 1 User-level commands
- 2 System calls
- 3 Library functions
- 4 Devices and device drivers
- 5 File formats
- 6 Games
- 7 Various miscellaneous stuff - macro packages etc.
- 8 System maintenance and operation commands
-
- Some Unix versions use non-numeric section names. For instance,
- Xenix uses "C" for commands and "S" for functions.
-
- Each section has an introduction, which you can read with "man #
- intro" where # is the section number.
-
- Sometimes the number is necessary to differentiate between a
- command and a library routine or system call of the same name.
- For instance, your system may have "time(1)", a manual page about
- the 'time' command for timing programs, and also "time(3)", a
- manual page about the 'time' subroutine for determining the
- current time. You can use "man 1 time" or "man 3 time" to
- specify which "time" man page you're interested in.
-
- You'll often find other sections for local programs or even
- subsections of the sections above - Ultrix has sections 3m, 3n,
- 3x and 3yp among others.
-
- 1.3) What does {some strange unix command name} stand for?
-
- awk = "Aho Weinberger and Kernighan"
-
- This language was named by its authors, Al Aho, Peter
- Weinberger and Brian Kernighan.
-
- grep = "Global Regular Expression Print"
-
- grep comes from the ed command to print all lines matching a
- certain pattern
-
- g/re/p
-
- where "re" is a "regular expression".
-
- fgrep = "Fixed GREP".
-
- fgrep searches for fixed strings only. The "f" does not stand
- for "fast" - in fact, "fgrep foobar *.c" is usually slower than
- "egrep foobar *.c" (Yes, this is kind of surprising. Try it.)
-